<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Admin/Live/index')}">直播列表</a></li>
			<li class="active"><a href="{:U('Admin/Live/add_competition')}">添加赛事直播</a></li>
			<li><a href="{:U('Admin/Live/add_activity')}">添加活动直播</a></li>

		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('Admin/MaintainStore/add_post')}">
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">直播名称：</label>
					<div class="span3">
						<input type="text" name="name" >
					</div>
					<label class="span1 control-label" style="width: 90px;">是否VR：</label>
					<div class="span3">
						<select class="select_2" name="typeId">
							<option value="1" >否</option>
							<option value="2" >是</option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">直播类型：</label>
					<div class="span3">
						<select class="select_2" name="typeId">
							<foreach name="types" item="vo">
								<option value="{$vo.typeId}" >{$vo.name}</option>
							</foreach>
						</select>
					</div>
					<label class="span1 control-label" style="width: 90px;">选择机位：</label>
					<div class="span3">
						<select class="select_2" name="channelId">
							<foreach name="chnnels" item="vo">
								<option value="{$vo.channelId}" >{$vo.channelName}</option>
							</foreach>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">开始时间：</label>
			
					<div class="span3">
						<input type="text" name="startTime" class="js-datetime"  value="{$formParam.startTime}" autocomplete="off">
					</div>
					<label class="span1 control-label" style="width: 90px;">结束时间：</label>
					<div class="span3">
						<input type="text" class="js-datetime" name="endTime" value="{$formParam.endTime}" autocomplete="off">
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">解说员：</label>
					<div class="span3">
						<select multiple="multiple" id="allOperatorIds" style="height:120px;">
						    <foreach name="commentators" item="vo">
								<option value="{$vo.operatorId}" >{$vo.ouserName}</option>
							</foreach>
						</select>
					</div>
					<label class="span1 control-label" style="width: 90px;text-align:center;margin-top:36px;">></label>
					<div class="span3">
						<input type="hidden" name="operatorIds" id="operatorIds"/>
						<select multiple="multiple" id="selectedOperatorIds" style="height:120px;">
							
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">A队名称：</label>
					<div class="span3">
						<input type="text" name="aTeamName" >
					</div>
					<label class="span1 control-label" style="width: 90px;">B队名称：</label>
					<div class="span3">
						<input type="text" name="bTeamName" >
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">A队图片：</label>
					<div class="span3" style="padding-left: 2px;text-align: left;">
						<input type="hidden" name="location_picture" id="location_picture" value="">
						<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','location_picture',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
							<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="location_picture_preview" width="95" style="cursor: hand" />
						</a>
					</div>
					<label class="span1 control-label" style="width: 90px;">B队图片：</label>
					<div class="span3" style="padding-left: 2px;text-align: left;">
						<input type="hidden" name="location_picture" id="location_picture" value="">
						<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','location_picture',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
							<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="location_picture_preview" width="95" style="cursor: hand" />
						</a>
					</div>
				</div>
				<div class="control-group">
					<label class="span2 control-label" style="width: 90px;">直播介绍：</label>
					<div class="span7">
						<textarea style="width: 556px; height: 60px;" name="introduction"></textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="span1 control-label" style="width: 90px;">封面图片：</label>
					<div style="padding-left: 130px;text-align: left;">
						<input type="hidden" name="location_picture" id="location_picture" value="">
						<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','location_picture',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
							<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="location_picture_preview" width="135" style="cursor: hand" />
						</a>
					</div>
				</div>
			<div class="form-actions" style="padding-left:260px;">
				<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
				&nbsp;&nbsp;<a class="btn" href="{:U('Admin/MaintainStore/index')}">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
	<script type="text/javascript" >
		function setOperatorIds(){
			var ids = [];
			$('#selectedOperatorIds option').each(function(){
				ids.push($(this).val());
			});
			$('#operatorIds').val(ids.join(','));
		}
		$('#allOperatorIds').dblclick(function(){  
			$('#selectedOperatorIds').append($('#allOperatorIds option:selected'));
	        $('#allOperatorIds option:selected').remove();  
	    });
		
		$('#selectedOperatorIds').dblclick(function(){  
			$('#allOperatorIds').append($('#selectedOperatorIds option:selected'));
	        $('#selectedOperatorIds option:selected').remove();  
	    });
	</script>
</body>
</html>